package com.laicunba.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.laicunba.dao.GenericQueryDao;
import com.laicunba.pojo.vo.FinancialFlowVO;
import com.laicunba.service.FinancialFlowService;

@Service
public class FinancialFlowServiceImpl implements FinancialFlowService {
	@Autowired
	private GenericQueryDao queryDao;

	@SuppressWarnings({ "rawtypes", "unchecked" })
	@Override
	public List<FinancialFlowVO> findFinancingTargetBid(String userId, String financingTargetBidType) {
		Map map = new HashMap(); 
		map.put("userId", userId);
		map.put("financingTargetBidType", financingTargetBidType);
		return queryDao.selectList("FINANCIAL_FLOW_VIEW.findFinancingTargetBid", map);
	}

	@Override
	public List<FinancialFlowVO> findWithdraw(String userId, String type) {
		Map map = new HashMap();
		map.put("userId", userId);
		map.put("type", type);
		return queryDao.selectList("WITHDRAW.findWithdraw", map);
	}

}
